Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Edited messages appear twice in fulltext search #3363

Merged
merged 7 commits into from
Jul 27, 2024

Conversation

adnull
Copy link
Contributor

@adnull adnull commented Apr 18, 2024

As stated in #3358 the search response contains both original and edited message.
This PR fixes it by removing of the original message from the fulltext index after indexing the edit message event.
I also made some cosmetic changes/fixes i found in the code

Signed-off-by: Alexander Dubovikov <[email protected]>

@adnull adnull requested a review from a team as a code owner April 18, 2024 20:45
Copy link
Contributor

@S7evinK S7evinK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise!

syncapi/consumers/roomserver.go Outdated Show resolved Hide resolved
syncapi/syncapi_test.go Show resolved Hide resolved
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 67.43%. Comparing base (3e62b98) to head (d46738a).

Files Patch % Lines
syncapi/consumers/roomserver.go 54.54% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3363      +/-   ##
==========================================
- Coverage   67.44%   67.43%   -0.02%     
==========================================
  Files         521      521              
  Lines       47366    47378      +12     
==========================================
+ Hits        31946    31948       +2     
- Misses      11422    11429       +7     
- Partials     3998     4001       +3     
Flag Coverage Δ
unittests 52.76% <66.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@S7evinK
Copy link
Contributor

S7evinK commented Jul 27, 2024

Thanks for this!

@S7evinK S7evinK merged commit 9897959 into matrix-org:main Jul 27, 2024
13 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants